﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ServerVideoChat
{
	public partial class Page_Settings
	{
		public Page_Settings()
		{
			this.InitializeComponent();
            DataContext = App.ViewModel;

			// Insert code required on object creation below this point.
		}

        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            Properties.Settings.Default.Save();
            NavigationService.Navigate(new Page_ServerMain());
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            Properties.Settings.Default.Reload();
            NavigationService.Navigate(new Page_ServerMain());
        }

        private void Page_Unloaded(object sender, System.Windows.RoutedEventArgs e)
        {
            Properties.Settings.Default.Reload();
        }
	}
}